-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new unstable option: -Zwrite-long-types-to-disk #113893
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
It looks like you missed updating the stderr for tests/ui/recursion/issue-83150.rs I plan to help this PR move along by contributing patches to it (I tend to have long paths to my working directories, so landing this will help unblock my own development) |
01103b5
to
8ffbd80
Compare
This comment has been minimized.
This comment has been minimized.
8ffbd80
to
0edb3e9
Compare
This comment has been minimized.
This comment has been minimized.
This option guards the logic of writing long type names in files and instead using short forms in error messages in rustc_middle/ty/error behind a flag. The main motivation for this change is to disable this behaviour when running ui tests. This logic can be triggered by running tests in a directory that has a long enough path, e.g. /my/very-long-path/where/rust-codebase/exists/ This means ui tests can fail depending on how long the path to their file is. Some ui tests actually rely on this behaviour for their assertions, so for those we enable the flag manually.
0edb3e9
to
8df3966
Compare
This comment has been minimized.
This comment has been minimized.
I can't figure out what the root cause of this last error I am getting is (to be fair I didn't put too much time investigating). The option I have added is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good from the compiler side, just had one concern about UI tests:
Most of these tests don't seem to be testing long-type-names. Can you remove -Zwrite-long-types-to-disk=yes
from all of them except for like long-E0308.rs
, and all the other normalization stuff like
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
and bless all the tests?
@compiler-errors done! I initially added |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (bd1ae28): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 650.399s -> 650.255s (-0.02%) |
Now that we have fixed the underlying cause of long type name inconsistencies in rust-lang#113893, we can remove the remap-path-prefix logic from CI
…ci, r=wesleywiser compiletest: remove ci-specific remap-path-prefix Now that we have fixed the underlying cause of long type name inconsistencies in rust-lang#113893, we can remove the remap-path-prefix logic from CI resolves rust-lang#113424
…ck, r=pnkfelix Dont pass `-Zwrite-long-types-to-disk=no` for `ui-fulldeps --stage=1` Due to this hack: https://github.com/rust-lang/rust/blob/601a34de8c10458b72a7781eb0b44a7981e4a2b1/src/bootstrap/test.rs#L1473-L1484 We use the stage 0 compiler to build the stage 1 fulldeps tests. That means that we don't have `-Zwrite-long-types-to-disk=no` which was added in rust-lang#113893. Add a temporary hack to fix this (https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Some.20tests.20failing.20with.20--stage.201) until the next beta bump.
This option guards the logic of writing long type names in files and instead using short forms in error messages in rustc_middle/ty/error behind a flag. The main motivation for this change is to disable this behaviour when running ui tests.
This logic can be triggered by running tests in a directory that has a long enough path, e.g. /my/very-long-path/where/rust-codebase/exists/
This means ui tests can fail depending on how long the path to their file is.
Some ui tests actually rely on this behaviour for their assertions, so for those we enable the flag manually.